package com.todod.base.module.base.api;


import com.todod.base.framework.common.pojo.CommonResult;
import com.todod.base.module.base.enums.ApiConstants;
import com.todod.base.module.base.vo.TeacherApiReqVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC服务", description = "退费订单接口")
public interface TeacherApi {

    String PREFIX = ApiConstants.PREFIX + "/teacher-manage";

    @GetMapping(PREFIX + "/get")
    @Operation(summary = "通过用户 ID 查询课程信息")
    @Parameter(name = "id", description = "课程id", example = "1", required = true)
    CommonResult<TeacherApiReqVO> getTeacher(@RequestParam("id") Long id);


    @GetMapping(PREFIX + "/get-leave")
    @Operation(summary = "通过教师 ID和时间 查询是否请假")
    @Parameter(name = "id", description = "老师id", example = "1", required = true)
    Boolean getLeave(@RequestParam("teacherId") Long teacherId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
}
